package com.kuangstudy.common.demo1;

/**
 * ClassName: Student
 * date: 2021/07/14 11:41:17
 *内部类不能包含静态成员，可以包含静态常量
 * @author zlk
 */
public class Student {
    private String name;
    private Integer age;
    class Head{
        private String name;
        private Integer age;
        public void show(){
            /*打印外部类的属性必须加类名.this.属性名*/
            name = "aaa";
            age = 18;
            System.out.println(name+" "+age);
            System.out.println(Student.this.name+""+Student.this.age);
        }
    }
}
